﻿@{
    Layout = null;
    var i = Model.PageIndex * Model.PageSize;
}
@using Domain.Model.Enums;
@model Domain.PageInfo<Domain.Model.News>

@foreach (var item in Model.EntityArray)
{
    <tr>
        <td>@(++i)</td>
<td>@item.CreateTime</td>
        <td>@item.Title</td>
        <td>@(item.IsValid==true?"启用":"禁用")</td>
        <td>
            <button class="btn btn-small" onclick="changeValid('@item.ID',@(item.IsValid ? "false" : "true"))">@(item.IsValid ? "禁用" : "启用")</button>
            @Html.ActionLink("编辑", "NewsEdit", new { id = item.ID }, new { @class = "btn btn-small" })
           
             <button class="btn btn-small" onclick="Del('@item.ID', '@item.Title')" >删除</button>
        </td>
    </tr>
}

